<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商城导航</title>
    <link rel="stylesheet" href="../js/sitenav.js">
    <link rel="stylesheet" href="../css/sitenav.css">
    <script src="./../js/flexible.js"></script>
</head>

<body>
    <header id="header">
        <a class="back" href="index.html">&lt;</a>
        <h4>商城导航</h4>
        <div class="appdown">
            <a href="index.html">
                <img src="../assets/images/header_app.png" alt="">
            </a>
        </div>
    </header>
    <main id="ws">
        <ul id="uu">
            
            <li>
                <a href="">
                    <img src="" alt="">
                    <span>
                        京东商城
                    </span>
                  
                </a>
            </li>
 
        </ul>
      
     </main>

    <section id ="footer">
        <div class="login">
            <div class="container">
                <div class="row">
                    <a href>
                        <div class="col-xs-3">登入</div>
                    </a>
                    <a href>
                        <div class="col-xs-4">注册</div>
                    </a>
                    <a href>
                        <div class="col-xs-5">返回顶部</div>
                    </a>
                </div>
            </div>
            <div class="content_b">
                <p>
                    <a href="#">手机APP下载</a>
                    <a href="#">慢慢买手机版</a>
                    "--掌上比价平台"
                </p>
                <p>m.manmanbuy.com 0</p>
            </div>
        </div>
    </section>
</body>

</html>

<script>
    fetch("http://chst.vip:1234/api/getsitenav")
    .then(body => body.json())
    .then(res => {
        console.log(res);
        let html = "";
        res.result.forEach(item => {
            html+=`
            <li>
                <a href="${item.navHref}">
                <img src="${item.navImg}" alt="">
                <span>${item.navTitle}</span>
                </a>
            </li>
           
            
            `
        })
        uu.innerHTML = html;



    })
</script>